package role

import (
	"context"
)

type Service interface {
	GetRolePage(ctx context.Context, cmd GetRolePageCommand) ([]Role, int64, error)
	GetRole(ctx context.Context, cmd GetRoleCommand) (Role, error)
	Insert(cmd SysRoleInsertReq) error
	Update(cmd SysRoleUpdateReq) error
	Remove(ctx context.Context, cmd DelRoleCommand) error
	GetPermissionByRole(cmd []string) ([]string, error)
	GetRoleDataScope(ctx context.Context, roleId int64) ([]string, error)
	UpdateDataScope(ctx context.Context, cmd UpdateDataScopeCommand) (err error)
	UpdateRolePermission(ctx context.Context, cmd UpdateRolePermissionCommand) (err error)
	GetUserIdsByRoleId(roleId string) ([]string, error)
	RemoveRoleUser(ctx context.Context, roleId string, userIds []string) error
	AddRoleUser(ctx context.Context, roleId string, userIds []string) error
	BatchCheckEnforce(request [][]interface{}) ([]bool, error)
}
